<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:include="include :: header('商品列表-编辑')" />
    <style>
        .shangjia{
            color: black;
        }
        .xiajia{
            color: #c3c3c3;
        }
        img{
            width: 50px;
            height: 50px;
        }
        .t1{
            border-collapse: collapse;
        }
        .t1 td{
            line-height: 25px;
            vertical-align: middle;
        }
        /* 样式 */
        .switch {
            position: relative;
            display: inline-block;
            width: 60px;
        }
        .switch span {
            display: inline-block;
            position: relative;
            width: 40px;
            height: 20px;
            -webkit-border-radius: 10px;
            border-radius: 10px;
            background-color: #ebebeb;
            border: 2px solid #ebebeb;
            cursor: pointer;
            -webkit-transition: all .1s ease;
            -o-transition: all .1s ease;
            transition: all .1s ease;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            -webkit-transition: .4s;
            transition: .4s;
            height: 80px;
        }

        input:checked + .slider {
            background-color: #2196F3;
        }

        input:focus + .slider {
            box-shadow: 0 0 1px #2196F3;
        }

        input:checked + .slider:before {
            -webkit-transform: translateX(26px);
            -ms-transform: translateX(26px);
            transform: translateX(26px);
        }
        .switch span:after {
            content: '';
            height: 20px;
            width: 20px;
            -webkit-border-radius: 50%;
            border-radius: 50%;
            position: absolute;
            left: 1px;
            top: -2px;
            color: #aaa;
            -webkit-transition: all .1s ease;
            -o-transition: all .1s ease;
            transition: all .1s ease;
            text-align: center;
            font-size: 13px;
            background-color: #fff;
            -webkit-box-shadow: rgba(0,0,0,.12) 0 1px 6px, rgba(0,0,0,.12) 0 1px 4px;
            box-shadow: rgba(0,0,0,.12) 0 1px 6px, rgba(0,0,0,.12) 0 1px 4px;
        }
        .zhaopai{
            float: right;
        }
        #zhaopai{
            margin-top: -10px;
        }


    </style>
</head>

<body >
<div class="row">
        <div class="card">
            <div class="card-toolbar clearfix">
                <form class="pull-left search-bar" id="keyword">
                    <div class="col-lg-12">
                        <div class="input-group">
                            <input type="hidden" class="form-control"  th:value="${shopId}" name="shopId">
                            <input type="text" class="form-control"  placeholder="请输入商品名称/原材料/描述" id="keywords" name="keywords">
                            <span class="input-group-btn">
                          <button class="btn btn-default" type="submit">搜索</button>
                        </span>
                        </div>
                    </div>
                </form>
                <div class="toolbar-btn-action pull-right">
                    <button  type="button" class="btn btn-primary" data-toggle="modal" data-target="#addDisheModal" data-whatever="@mdo"><i class="mdi mdi-plus"></i>新增</button>
                    <a class="btn btn-danger" href="javascript:void(0)" onclick="return delDishe()"><i class="mdi mdi-window-close"></i> 删除</a>
                </div>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>订单编号</th>
                            <th>下单时间</th>
                            <th>商品</th>
                            <th>金额</th>
                            <th>收货人</th>
                            <th>收货地址</th>
                            <th>手机号</th>
                            <th>备注</th>
                            <th>状态</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="order,var:${order}">
                            <td th:text="${var.count}"></td>
                            <td th:text="${order.orderId}"></td>
                            <td th:text="${order.orderTime}"></td>
                            <td th:text="${order.disheName}"></td>
                            <td th:text="${order.price}"></td>
                            <td th:text="${order.name}"></td>
                            <td th:text="${order.address}"></td>
                            <td th:text="${order.phone}"></td>
                            <td th:text="${order.remark}"></td>
                            <td th:if="${order.status=='0'}">
                                <span  class="badge badge-success">进行中</span>
                            </td>
                            <td th:if="${order.status=='1'}">
                                <span  class="badge badge-success">完成</span>
                            </td>
                            <td th:if="${order.status=='2'}">
                                <span  class="badge badge-success">退款中</span>
                            </td>

                        </tr>
                        </tbody>
                    </table>
                </div>
                <ul class="pagination">
<!--                     <span th:text="${page}"></span>-->
                    <li><a  th:href="@{/order/getOrderByAll(pageNo=${page.firstPage},shopId=${shopId})}">首页</a></li>
                    <li><a  th:href="@{/order/getOrderByAll(pageNo=${page.prePage},shopId=${shopId})}">[上一页]</a></li>
                    <li><a  th:href="@{/order/getOrderByAll(pageNo=${page.nextPage},shopId=${shopId})}" >[下一页]</a></li>
                    <li><a  th:href="@{/order/getOrderByAll(pageNo=${page.lastPage},shopId=${shopId})}">[尾  页]</a></li>
                    <li><span>共[[${page.total}]]条记录</span></li>
                </ul>
            </div>
        </div>
</div>
</body>
</html>